<?php
class SendEmail {
    private $toEmail=null;
    private $string=null;
    public function __construct($data){
        $this->string = $data['VerifiCode'];
        $this->toEmail = $data['email'];
    }

    public function sendemail(){
        var_dump($this->string);
        $subject = 'DreamTree';

        /**
         * 【未完成】这里的message要写成邮箱认可的链接状态
         * */

        $message = $this->string;
       // $message = "您的重置链接为"."<h3>".$this->string."</h3>";
// Send
        $res = mail("$this->toEmail", "$subject", "$message");
        return array(
            'status'=>$res,
            'time'=>time(),
        );
    }
}
